﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace iTeamyou.LTS.Core.Migrations
{
    public partial class Update101603 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_LicenseTypes",
                table: "LicenseTypes");

            migrationBuilder.AlterColumn<string>(
                name: "Module",
                table: "LicenseTypes",
                type: "varchar(95)",
                nullable: false,
                oldClrType: typeof(string),
                oldType: "longtext")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddPrimaryKey(
                name: "PK_LicenseTypes",
                table: "LicenseTypes",
                columns: new[] { "TypeId", "Module" });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_LicenseTypes",
                table: "LicenseTypes");

            migrationBuilder.AlterColumn<string>(
                name: "Module",
                table: "LicenseTypes",
                type: "longtext",
                nullable: false,
                oldClrType: typeof(string),
                oldType: "varchar(95)")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddPrimaryKey(
                name: "PK_LicenseTypes",
                table: "LicenseTypes",
                column: "TypeId");
        }
    }
}
